package com.guchenbo.example.regex;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @author guchenbo
 * @date 2024/8/27
 */
public class RegexDemo {
    public static void main(String[] args) {
        String regex = "^[\\u4E00-\\u9FA5A-Za-z0-9_]+$";
//        String regex = "[\\u4E00-\\u9FA5A-Za-z0-9_]+";
        Pattern pattern = Pattern.compile(regex);
        String input="我ddd-";
        Matcher matcher = pattern.matcher(input);
        System.out.println(matcher.matches());

        System.out.println(matcher.find());
    }
}
